// Caixa de autor no final (protegida contra auto-links) add_filter( 'the_content', function( $content ) { if ( ! ( is_singular( 'post' ) && in_the_loop() && is_main_query() ) ) return $content; $author_id = get_the_author_meta( 'ID' ); $author_name = get_the_author(); $author_url = get_author_posts_url( $author_id ); $author_bio = get_the_author_meta( 'description' ); $custom_id = get_user_meta( $author_id, 'odisseia_author_avatar_id', true ); if ( $custom_id ) { $avatar = '' . esc_attr( $author_name ) . ''; } else { $avatar = get_avatar( $author_id, 64, '', $author_name, array( 'class' => 'odisseia-author-img' ) ); } $box = '
'; $box .= '
' . $avatar . '
'; $box .= '
'; $box .= 'Sobre o autor'; $box .= '

' . esc_html( $author_name ) . '

'; if ( ! empty( $author_bio ) ) { $box .= '
' . esc_html( $author_bio ) . '
'; } $box .= '
'; $box .= '
'; $box .= ''; return $content . $box; }, 99999 );